package com.huike.business.service;

import com.huike.business.domain.TbBusiness;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huike.business.domain.dto.TbBusinessDTO;
import com.huike.business.domain.dto.TbBusinessPageDTO;
import com.huike.business.domain.vo.TbBusinessVO;
import com.huike.clues.domain.vo.AssignmentVo;
import com.huike.common.core.page.TableDataInfo;

import java.util.List;

/**
* @author 93238
* @description 针对表【tb_business(商机)】的数据库操作Service
* @createDate 2023-10-12 06:08:37
*/
public interface TbBusinessService extends IService<TbBusiness> {

    /**
     * 线索转商机
     *
     * @param clueId 线索id
     */
    void changeBusiness(Long clueId);

    /**
     * 查询商机列表
     * @param tbBusinessPageDTO
     * @return
     */
    TableDataInfo<List<TbBusinessVO>> pageList(TbBusinessPageDTO tbBusinessPageDTO);

    /**
     *新增商机
     * @param tbBusiness
     */
    void add(TbBusiness tbBusiness);

    /**
     * 获取商机详细信息
     * @param id
     * @return
     */
    TbBusinessVO findById(Long id);

    /**
     * 商机分配
     * @param assignmentVo
     */
    void assignment(AssignmentVo assignmentVo);

    /**
     * 修改商机
     * @param tbBusinessVO
     */
    void updateBusiness(TbBusinessVO tbBusinessVO);

    /**
     * 踢回公海
     * @param id
     * @param reason
     */
    void back(Long id, String reason);

    /**
     * 批量捞取
     * @param assignmentVo
     */
    void gain(AssignmentVo assignmentVo);

    /**
     * 分页查询公海池
     * @param tbBusinessPageDTO
     * @return
     */
    TableDataInfo<List<TbBusinessVO>> poolList(TbBusinessPageDTO tbBusinessPageDTO);

    /**
     * 删除商机
     * @param ids
     */
    void delete(List<Long> ids);

}

